import 'package:hm_show_flutter/entity/about_entity.dart';
import 'package:hm_show_flutter/entity/activity_detail_entity.dart';
import 'package:hm_show_flutter/entity/activity_list_entity.dart';
import 'package:hm_show_flutter/entity/banner_entity.dart';
import 'package:hm_show_flutter/entity/category_list_entity.dart';
import 'package:hm_show_flutter/entity/category_parent_entity.dart';
import 'package:hm_show_flutter/entity/collection_list_entity.dart';
import 'package:hm_show_flutter/entity/company_detail_entity.dart';
import 'package:hm_show_flutter/entity/company_entity.dart';
import 'package:hm_show_flutter/entity/company_list_entity.dart';
import 'package:hm_show_flutter/entity/course_list_entity.dart';
import 'package:hm_show_flutter/entity/goods_detail_entity.dart';
import 'package:hm_show_flutter/entity/goods_list_entity.dart';
import 'package:hm_show_flutter/entity/home_entity.dart';
import 'package:hm_show_flutter/entity/init_entity.dart';
import 'package:hm_show_flutter/entity/login_entity.dart';
import 'package:hm_show_flutter/entity/member_entity.dart';
import 'package:hm_show_flutter/entity/register_entity.dart';
import 'package:hm_show_flutter/entity/upload_avatar_entity.dart';
import 'package:hm_show_flutter/entity/user_info_entity.dart';
import 'package:hm_show_flutter/entity/version_entity.dart';

class EntityFactory {
  static T generateOBJ<T>(json) {
    if (1 == 0) {
      return null;
    } else if (T.toString() == "AboutEntity") {
      return AboutEntity.fromJson(json) as T;
    } else if (T.toString() == "ActivityDetailEntity") {
      return ActivityDetailEntity.fromJson(json) as T;
    } else if (T.toString() == "ActivityListEntity") {
      return ActivityListEntity.fromJson(json) as T;
    } else if (T.toString() == "BannerEntity") {
      return BannerEntity.fromJson(json) as T;
    } else if (T.toString() == "CategoryListEntity") {
      return CategoryListEntity.fromJson(json) as T;
    } else if (T.toString() == "CategoryParentEntity") {
      return CategoryParentEntity.fromJson(json) as T;
    } else if (T.toString() == "CollectionListEntity") {
      return CollectionListEntity.fromJson(json) as T;
    } else if (T.toString() == "CompanyDetailEntity") {
      return CompanyDetailEntity.fromJson(json) as T;
    } else if (T.toString() == "CompanyEntity") {
      return CompanyEntity.fromJson(json) as T;
    } else if (T.toString() == "CompanyListEntity") {
      return CompanyListEntity.fromJson(json) as T;
    } else if (T.toString() == "CourseListEntity") {
      return CourseListEntity.fromJson(json) as T;
    } else if (T.toString() == "GoodsDetailEntity") {
      return GoodsDetailEntity.fromJson(json) as T;
    } else if (T.toString() == "GoodsListEntity") {
      return GoodsListEntity.fromJson(json) as T;
    } else if (T.toString() == "HomeEntity") {
      return HomeEntity.fromJson(json) as T;
    } else if (T.toString() == "InitEntity") {
      return InitEntity.fromJson(json) as T;
    } else if (T.toString() == "LoginEntity") {
      return LoginEntity.fromJson(json) as T;
    } else if (T.toString() == "MemberEntity") {
      return MemberEntity.fromJson(json) as T;
    } else if (T.toString() == "RegisterEntity") {
      return RegisterEntity.fromJson(json) as T;
    } else if (T.toString() == "UploadAvatarEntity") {
      return UploadAvatarEntity.fromJson(json) as T;
    } else if (T.toString() == "UserInfoEntity") {
      return UserInfoEntity.fromJson(json) as T;
    } else if (T.toString() == "VersionEntity") {
      return VersionEntity.fromJson(json) as T;
    } else {
      return null;
    }
  }
}